package com.project.service;

import cn.hutool.db.Page;
import com.project.entity.po.Comment;
import com.project.entity.po.RechargeRecord;
import com.project.entity.po.User;
import com.project.entity.qo.CommentQo;
import com.project.entity.qo.MemberQo;
import com.project.entity.qo.UserQo;
import com.project.entity.vo.RechargeRecordVo;
import com.project.result.ResponseResult;
import com.project.result.ResultCode;
import org.springframework.web.multipart.MultipartFile;
import com.project.entity.vo.UserVo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @ProjectName:
 * @Package:
 * @ClassName:
 * @Author: ZhaoLongShi
 * @CreateDate:
 */
@SuppressWarnings("all")
public interface UserService {

    String upload(MultipartFile file);

    /**
     * 检查用户名是否存在
     *
     * @param username
     * @return
     */
    ResponseResult<UserVo> selectByUsername(String username);

    /**
     * 检查用户名是否存在
     *
     * @param username
     * @return
     */
    ResponseResult<UserVo> selectByPhone(Long phone);

    /**
     * 添加用户
     *
     * @param userQo
     * @return
     */
    ResponseResult<ResultCode> register(UserQo userQo);

    /**
     * 根据用户ID更新用户信息
     *
     * @param userQo
     * @return
     */
    ResponseResult updateUserById(UserQo userQo);

    /**
     * 根据用户ID修改密码
     *
     * @param oldPassword
     * @param newPassword
     * @return
     */
    ResponseResult updatePasswordById(String oldPassword, String newPassword);

    /**
     * 开通VIP
     *
     * @param memberQo
     * @return
     */
    ResponseResult registerVip(MemberQo memberQo);

    /**
     * 根据用户ID查询会员信息
     *
     * @param userId
     * @return
     */
    ResponseResult selectMemberInfoByUserId();

    /**
     * 会员第三方充值
     *
     * @param price
     * @return
     */
    ResponseResult rechargeWithOthor(double price, String rechargeType);

    /**
     * 会员余额充值
     *
     * @param price
     * @return
     */
    ResponseResult rechargeWithBalance(double price);

    /**
     * 充值到余额
     * @param price
     * @return
     */
    ResponseResult rechargeToBalance(double price);
    /**
     * 根据用户ID获取充值记录
     *
     * @param userid
     * @return
     */
    ResponseResult<List<RechargeRecordVo>> selectRecordByUserId();

    /**
     * 获取所有用户
     *
     * @return
     */
    ResponseResult<Page> seleteAllUser(int current);

    /**
     * 手机号登录
     *
     * @param phone
     * @param code
     * @return
     */
    Serializable login(String phone, String code);
}
